from django.conf.urls import patterns, url
from api.internal.admin.maestro.users import (
    get_user_chn,
    UserView,
    SingleUserView,
    update_user_merchant_role,
    get_update_user_role_preset,
    reset_password
)
from api.internal.admin.maestro.merchant import (
    RoleView,
    SingleRoleView,
    get_create_role_preset
)
from api.internal.admin.maestro.permission import (
    PermissionView,
    SinglePermissionView,
    get_user_menu_list,
    get_page_key_mapper
)
from api.internal.dwc_api.product_analysis.views import (
    get_bet_user_analysis,
    get_game_aggregate_analysis,
    get_game_aggregate_analysis_preset,
    get_fish_profit_analysis,
    get_fish_profit_analysis_preset
)
from api.internal.dwc_api.op_analysis.views import (
    get_general_report,
    get_recharge_analysis,
    get_op_user_analysis,
    get_daily_analysis,
    get_pay_type,
    get_withdraw_analysis
)
from api.internal.dwc_api.user_analysis.views import (
    get_active_user_analysis,
    get_pay_ability_analysis,
    get_new_user_analysis,
    get_new_user_stay_analysis,
    get_continuous_recharge_analysis,
    get_game_stage_analysis
)
from api.internal.dwc_api.integrated_analysis import views as integrated_analysis_view

urlpatterns = patterns(
    '',
    # 用戶與角色管理
    url(r'^user/?$', UserView.as_view()),
    url(r'^user/(?P<user_id>\d+)/?$', SingleUserView.as_view()),
    url(r'^user/reset/?$', reset_password),
    url(r'^user/update_user_merchant_role/?$', update_user_merchant_role),
    url(r'^user/get_update_user_role_preset/?$', get_update_user_role_preset),
    url(r'^role/?$', RoleView.as_view()),
    url(r'^role/(?P<role_id>\d+)/?$', SingleRoleView.as_view()),
    url(r'^role/get_create_role_preset/?$', get_create_role_preset),
    # 權限管理
    url(r'^permission/?$', PermissionView.as_view()),
    url(r'^permission/(?P<perm_id>\d+)/?$', SinglePermissionView.as_view()),
    url(r'^permission/get_page_key_mapper/?$', get_page_key_mapper),
    url(r'^permission/get_user_menu_list/?$', get_user_menu_list),
    # 基礎數據統計
    url(r'^analysis/get_user_chn/?$', get_user_chn),
    url(r'^analysis/get_pay_type/?$', get_pay_type),
    # 產品數據統計
    url(r'^analysis/get_bet_user_analysis/?$', get_bet_user_analysis),
    url(r'^analysis/get_game_aggregate_analysis/?$', get_game_aggregate_analysis),
    url(r'^analysis/get_game_aggregate_analysis/preset/?$', get_game_aggregate_analysis_preset),
    url(r'^analysis/get_fish_profit_analysis/?$', get_fish_profit_analysis),
    url(r'^analysis/get_fish_profit_analysis/preset/?$', get_fish_profit_analysis_preset),
    # 運營數據統計
    url(r'^analysis/get_general_analysis/?$', get_general_report),
    url(r'^analysis/get_op_user_analysis/?$', get_op_user_analysis),
    url(r'^analysis/get_recharge_analysis/?$', get_recharge_analysis),
    url(r'^analysis/get_daily_analysis/?$', get_daily_analysis),
    url(r'^analysis/get_withdraw_analysis/?$', get_withdraw_analysis),
    # 用戶數據統計
    url(r'^analysis/get_active_user_analysis/?$', get_active_user_analysis),
    url(r'^analysis/get_pay_ability_analysis/?$', get_pay_ability_analysis),
    url(r'^analysis/get_new_user_analysis/?$', get_new_user_analysis),
    url(r'^analysis/get_new_user_stay_analysis/?$', get_new_user_stay_analysis),
    url(r'^analysis/get_continuous_recharge_analysis/?$', get_continuous_recharge_analysis),
    url(r'^analysis/get_game_stage_analysis/?$', get_game_stage_analysis),
    # 數據運營線上報表
    url(r'^analysis/integrated/product_profit_analysis/?$', integrated_analysis_view.get_product_profit_analysis),
    url(r'^analysis/integrated/user_analysis/?$', integrated_analysis_view.get_user_analysis),
    url(r'^analysis/integrated/bet_analysis/?$', integrated_analysis_view.get_bet_analysis),
    url(r'^analysis/integrated/channel_analysis/?$', integrated_analysis_view.get_channel_analysis),
    url(r'^analysis/integrated/recharge_analysis/?$', integrated_analysis_view.get_recharge_analysis),
    url(r'^analysis/integrated/withdraw_analysis/?$', integrated_analysis_view.get_withdraw_analysis)
)
